package com.emp.view.service;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.song.emp.vo.EmpVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient("EMP-DEPT-SERVICE")
public interface EmpSerivce {

    /**
     * 部门列表
     * @return
     */
    @RequestMapping("/depts")
      List<EmpVo> findDepts();

    /**
     * 员工和部门列表
     * @return
     */
    @RequestMapping("/emps")
    List<EmpVo> findEmps();

    @RequestMapping("/save")
    boolean save(EmpVo empVo);

    @GetMapping("/del/{eid}")
    boolean delete(@PathVariable("eid") int eid);

    @GetMapping("/find/{eid}")
    EmpVo findById(@PathVariable("eid") int eid);
}
